﻿/***********************************************************************
 * <copyright file="IRole.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Sunday, March 23, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using BusinessSecurity;

namespace DataSecurity.StandartInterfaces
{
    /// <summary>
    /// IRole interface
    /// </summary>
    public interface IRole
    {
        /// <summary>
        /// Gets the role.
        /// </summary>
        /// <param name="roleId">The role identifier.</param>
        /// <returns></returns>
        Role GetRole(int roleId);

        /// <summary>
        /// Gets the role.
        /// </summary>
        /// <param name="roleName">Name of the role.</param>
        /// <returns></returns>
        Role GetRole(string roleName);

        /// <summary>
        /// Gets the roles.
        /// </summary>
        /// <returns></returns>
        List<Role> GetRoles();

        /// <summary>
        /// Gets the roles by active.
        /// </summary>
        /// <param name="isActive">if set to <c>true</c> [is active].</param>
        /// <returns></returns>
        List<Role> GetRolesByIsActive(bool isActive);

        /// <summary>
        /// Gets the paged.
        /// </summary>
        /// <param name="currentPage">The current page.</param>
        /// <param name="totalPage">The total page.</param>
        /// <returns></returns>
        List<Role> GetPaged(int currentPage, ref int totalPage);

        /// <summary>
        /// Gets the roles for user.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        /// <returns></returns>
        List<Role> GetRolesForUser(int userId);

        /// <summary>
        /// Inserts the role.
        /// </summary>
        /// <param name="userGroup">The user group.</param>
        /// <returns></returns>
        object InsertRole(Role userGroup);

        /// <summary>
        /// Updates the role.
        /// </summary>
        /// <param name="role">The role.</param>
        /// <returns></returns>
        object UpdateRole(Role role);

        /// <summary>
        /// Deletes the role.
        /// </summary>
        /// <param name="role">The role.</param>
        /// <returns></returns>
        object DeleteRole(Role role);
    }
}
